.class Lcom/example/inshopbuy/InShopMerchantActivity$3;
.super Ljava/lang/Thread;
.source "InShopMerchantActivity.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/example/inshopbuy/InShopMerchantActivity;->getMerchantPicturesSource()Z
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/example/inshopbuy/InShopMerchantActivity;


# direct methods
.method constructor <init>(Lcom/example/inshopbuy/InShopMerchantActivity;)V
    .locals 0

    .prologue
    .line 1
    iput-object p1, p0, Lcom/example/inshopbuy/InShopMerchantActivity$3;->this$0:Lcom/example/inshopbuy/InShopMerchantActivity;

    .line 306
    invoke-direct {p0}, Ljava/lang/Thread;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 13

    .prologue
    .line 308
    invoke-super {p0}, Ljava/lang/Thread;->run()V

    .line 310
    new-instance v5, Landroid/os/Message;

    invoke-direct {v5}, Landroid/os/Message;-><init>()V

    .line 312
    .local v5, "msg":Landroid/os/Message;
    new-instance v11, Ljava/lang/StringBuilder;

    iget-object v12, p0, Lcom/example/inshopbuy/InShopMerchantActivity$3;->this$0:Lcom/example/inshopbuy/InShopMerchantActivity;

    # getter for: Lcom/example/inshopbuy/InShopMerchantActivity;->m:Lmyapp/MyApp;
    invoke-static {v12}, Lcom/example/inshopbuy/InShopMerchantActivity;->access$4(Lcom/example/inshopbuy/InShopMerchantActivity;)Lmyapp/MyApp;

    move-result-object v12

    invoke-virtual {v12}, Lmyapp/MyApp;->getWebConfig()Ljava/lang/String;

    move-result-object v12

    invoke-static {v12}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v12

    invoke-direct {v11, v12}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v12, "/index.php?ctrl=app&action=getShopRealInfo&shopid="

    invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v11

    iget-object v12, p0, Lcom/example/inshopbuy/InShopMerchantActivity$3;->this$0:Lcom/example/inshopbuy/InShopMerchantActivity;

    # getter for: Lcom/example/inshopbuy/InShopMerchantActivity;->shopid:Ljava/lang/String;
    invoke-static {v12}, Lcom/example/inshopbuy/InShopMerchantActivity;->access$16(Lcom/example/inshopbuy/InShopMerchantActivity;)Ljava/lang/String;

    move-result-object v12

    invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v11

    const-string v12, "&datatype=json"

    invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v11

    invoke-virtual {v11}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v10

    .line 313
    .local v10, "url":Ljava/lang/String;
    const-string v11, "getShopSource--------------url--"

    invoke-static {v11, v10}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 315
    iget-object v11, p0, Lcom/example/inshopbuy/InShopMerchantActivity$3;->this$0:Lcom/example/inshopbuy/InShopMerchantActivity;

    # getter for: Lcom/example/inshopbuy/InShopMerchantActivity;->m:Lmyapp/MyApp;
    invoke-static {v11}, Lcom/example/inshopbuy/InShopMerchantActivity;->access$4(Lcom/example/inshopbuy/InShopMerchantActivity;)Lmyapp/MyApp;

    move-result-object v11

    invoke-static {v10, v11}, LPlugclass/HttpConn;->getStr(Ljava/lang/String;Lmyapp/MyApp;)Ljava/lang/String;

    move-result-object v9

    .line 317
    .local v9, "str":Ljava/lang/String;
    :try_start_0
    new-instance v4, Lorg/json/JSONObject;

    invoke-direct {v4, v9}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    .line 318
    .local v4, "json":Lorg/json/JSONObject;
    const-string v11, "error"

    invoke-virtual {v4, v11}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v11

    const-string v12, "true"

    invoke-virtual {v11, v12}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v11

    if-eqz v11, :cond_0

    .line 319
    const-string v11, "msg"

    invoke-virtual {v4, v11}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v11

    iput-object v11, v5, Landroid/os/Message;->obj:Ljava/lang/Object;

    .line 320
    const/4 v11, 0x1

    iput v11, v5, Landroid/os/Message;->arg1:I

    .line 321
    iget-object v11, p0, Lcom/example/inshopbuy/InShopMerchantActivity$3;->this$0:Lcom/example/inshopbuy/InShopMerchantActivity;

    # getter for: Lcom/example/inshopbuy/InShopMerchantActivity;->h:Landroid/os/Handler;
    invoke-static {v11}, Lcom/example/inshopbuy/InShopMerchantActivity;->access$17(Lcom/example/inshopbuy/InShopMerchantActivity;)Landroid/os/Handler;

    move-result-object v11

    invoke-virtual {v11, v5}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    .line 359
    .end local v4    # "json":Lorg/json/JSONObject;
    :goto_0
    return-void

    .line 324
    .restart local v4    # "json":Lorg/json/JSONObject;
    :cond_0
    const-string v11, "msg"

    invoke-virtual {v4, v11}, Lorg/json/JSONObject;->isNull(Ljava/lang/String;)Z

    move-result v11

    if-eqz v11, :cond_1

    .line 325
    const/4 v11, 0x2

    iput v11, v5, Landroid/os/Message;->arg1:I

    .line 326
    iget-object v11, p0, Lcom/example/inshopbuy/InShopMerchantActivity$3;->this$0:Lcom/example/inshopbuy/InShopMerchantActivity;

    # getter for: Lcom/example/inshopbuy/InShopMerchantActivity;->h:Landroid/os/Handler;
    invoke-static {v11}, Lcom/example/inshopbuy/InShopMerchantActivity;->access$17(Lcom/example/inshopbuy/InShopMerchantActivity;)Landroid/os/Handler;

    move-result-object v11

    invoke-virtual {v11, v5}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 354
    .end local v4    # "json":Lorg/json/JSONObject;
    :catch_0
    move-exception v0

    .line 355
    .local v0, "e":Lorg/json/JSONException;
    invoke-virtual {v0}, Lorg/json/JSONException;->printStackTrace()V

    .line 356
    const/4 v11, 0x3

    iput v11, v5, Landroid/os/Message;->arg1:I

    .line 357
    iget-object v11, p0, Lcom/example/inshopbuy/InShopMerchantActivity$3;->this$0:Lcom/example/inshopbuy/InShopMerchantActivity;

    # getter for: Lcom/example/inshopbuy/InShopMerchantActivity;->h:Landroid/os/Handler;
    invoke-static {v11}, Lcom/example/inshopbuy/InShopMerchantActivity;->access$17(Lcom/example/inshopbuy/InShopMerchantActivity;)Landroid/os/Handler;

    move-result-object v11

    invoke-virtual {v11, v5}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    goto :goto_0

    .line 329
    .end local v0    # "e":Lorg/json/JSONException;
    .restart local v4    # "json":Lorg/json/JSONObject;
    :cond_1
    :try_start_1
    const-string v11, "msg"

    invoke-virtual {v4, v11}, Lorg/json/JSONObject;->getJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v6

    .line 330
    .local v6, "obj":Lorg/json/JSONObject;
    const-string v11, "shopRealInfo"

    invoke-virtual {v6, v11}, Lorg/json/JSONObject;->getJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object v8

    .line 332
    .local v8, "shopinfo":Lorg/json/JSONArray;
    const/4 v1, 0x0

    .local v1, "i":I
    :goto_1
    invoke-virtual {v8}, Lorg/json/JSONArray;->length()I

    move-result v11

    if-lt v1, v11, :cond_2

    .line 351
    iput-object v9, v5, Landroid/os/Message;->obj:Ljava/lang/Object;

    .line 352
    const/4 v11, 0x5

    iput v11, v5, Landroid/os/Message;->arg1:I

    .line 353
    iget-object v11, p0, Lcom/example/inshopbuy/InShopMerchantActivity$3;->this$0:Lcom/example/inshopbuy/InShopMerchantActivity;

    # getter for: Lcom/example/inshopbuy/InShopMerchantActivity;->h:Landroid/os/Handler;
    invoke-static {v11}, Lcom/example/inshopbuy/InShopMerchantActivity;->access$17(Lcom/example/inshopbuy/InShopMerchantActivity;)Landroid/os/Handler;

    move-result-object v11

    invoke-virtual {v11, v5}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    goto :goto_0

    .line 334
    :cond_2
    invoke-virtual {v8, v1}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v11

    const-string v12, "imglist"

    invoke-virtual {v11, v12}, Lorg/json/JSONObject;->getJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object v2

    .line 336
    .local v2, "imgs":Lorg/json/JSONArray;
    const/4 v3, 0x0

    .local v3, "j":I
    :goto_2
    invoke-virtual {v2}, Lorg/json/JSONArray;->length()I

    move-result v11

    if-lt v3, v11, :cond_3

    .line 332
    add-int/lit8 v1, v1, 0x1

    goto :goto_1

    .line 338
    :cond_3
    new-instance v7, Lbean/Shopimg;

    invoke-direct {v7}, Lbean/Shopimg;-><init>()V

    .line 339
    .local v7, "shopimg":Lbean/Shopimg;
    invoke-virtual {v8, v1}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v11

    const-string v12, "name"

    invoke-virtual {v11, v12}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v11

    invoke-virtual {v7, v11}, Lbean/Shopimg;->setName(Ljava/lang/String;)V

    .line 340
    invoke-virtual {v8, v1}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v11

    const-string v12, "imgcount"

    invoke-virtual {v11, v12}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v11

    invoke-virtual {v7, v11}, Lbean/Shopimg;->setCount(Ljava/lang/String;)V

    .line 341
    invoke-virtual {v2, v3}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v11

    const-string v12, "img"

    invoke-virtual {v11, v12}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v11

    invoke-virtual {v7, v11}, Lbean/Shopimg;->setImg(Ljava/lang/String;)V

    .line 342
    iget-object v11, p0, Lcom/example/inshopbuy/InShopMerchantActivity$3;->this$0:Lcom/example/inshopbuy/InShopMerchantActivity;

    # getter for: Lcom/example/inshopbuy/InShopMerchantActivity;->shopimgs:Ljava/util/List;
    invoke-static {v11}, Lcom/example/inshopbuy/InShopMerchantActivity;->access$15(Lcom/example/inshopbuy/InShopMerchantActivity;)Ljava/util/List;

    move-result-object v11

    invoke-interface {v11, v7}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 343
    if-nez v3, :cond_4

    .line 344
    new-instance v11, Ljava/lang/StringBuilder;

    iget-object v12, p0, Lcom/example/inshopbuy/InShopMerchantActivity$3;->this$0:Lcom/example/inshopbuy/InShopMerchantActivity;

    # getter for: Lcom/example/inshopbuy/InShopMerchantActivity;->shopimgs:Ljava/util/List;
    invoke-static {v12}, Lcom/example/inshopbuy/InShopMerchantActivity;->access$15(Lcom/example/inshopbuy/InShopMerchantActivity;)Ljava/util/List;

    move-result-object v12

    invoke-interface {v12, v7}, Ljava/util/List;->indexOf(Ljava/lang/Object;)I

    move-result v12

    invoke-static {v12}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v12

    invoke-direct {v11, v12}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v11}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v11

    invoke-virtual {v7, v11}, Lbean/Shopimg;->setId(Ljava/lang/String;)V

    .line 345
    iget-object v11, p0, Lcom/example/inshopbuy/InShopMerchantActivity$3;->this$0:Lcom/example/inshopbuy/InShopMerchantActivity;

    # getter for: Lcom/example/inshopbuy/InShopMerchantActivity;->shoptypes:Ljava/util/List;
    invoke-static {v11}, Lcom/example/inshopbuy/InShopMerchantActivity;->access$14(Lcom/example/inshopbuy/InShopMerchantActivity;)Ljava/util/List;

    move-result-object v11

    invoke-interface {v11, v7}, Ljava/util/List;->add(Ljava/lang/Object;)Z
    :try_end_1
    .catch Lorg/json/JSONException; {:try_start_1 .. :try_end_1} :catch_0

    .line 336
    :cond_4
    add-int/lit8 v3, v3, 0x1

    goto :goto_2
.end method

.method public declared-synchronized start()V
    .locals 1

    .prologue
    .line 362
    monitor-enter p0

    :try_start_0
    invoke-super {p0}, Ljava/lang/Thread;->start()V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 363
    monitor-exit p0

    return-void

    .line 362
    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0
.end method
